package com.stox.indicator;

import javax.validation.constraints.NotNull;

import lombok.Data;

import org.hibernate.validator.constraints.Range;

import com.stox.dto.BarValue;
import com.stox.indicator.AbstractMovingAverage.Configuration;

public abstract class AbstractMovingAverage implements Overlay<Configuration, Double> {

	@Data
	public static class Configuration{
		
		@Range(min=2, message="message.error.invalid.span")
		private int span = 20;
		
		@NotNull
		private BarValue barValue = BarValue.CLOSE;
		
	}

	@Override
	public Configuration createDefaultConfiguration() {
		return new Configuration();
	}
	

	
}
